/*
 * Copyright 2012-2018 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 *
 * https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
 * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
 * specific language governing permissions and limitations under the License.
 */
package com.swak.boot.config.monitor;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.swak.Constants;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

@Getter
@Setter
@ConfigurationProperties(prefix = Constants.MONITOR_PREFIX)
public class MonitorProperties {

	private Dubbo dubbo = new Dubbo();

	@Getter
	@Setter
	@Accessors(chain = true)
	public class Dubbo {

		/**
		 * 目前仅支持这参数的配置
		 */
		private String registryAddress;
		private String registryGroup = "dubbo";
		private String registryNameSpace = "public";
		private Integer registryTimeout;

		/**
		 * 没有用户名和密码
		 */
		private String username;
		private String password;

		/**
		 * 目前配置中心和元数据中心全部使用的是注册中心
		 */
		private String configCenter;
		private String configCenterGroup;
		private String configCenterGroupNameSpace;

		/**
		 * 这是元数据中心的一个属性
		 */
		private boolean cluster;
		private String metadataAddress;
		private String metadataGroup;
		private String metadataGroupNameSpace;
	}
}